const mongoose = require("mongoose");
mongoose.connect(
  "mongodb://zg6:eBxBJKSAMkNJMpHb@8.130.141.170:27017/zg6?authMechanism=DEFAULT&authSource=zg6"
);
const conn = mongoose.connection;
conn.on("open", () => {
  console.log("数据库链接成功");
  console.log("http://localhost:3000/");
});
conn.on("error", (err) => {
  console.log(err);
});
module.exports = mongoose;
